<?php htmlTemplate('admin_header_frame.php');?>
<div class="title">发送列表
<a  href="<?php echo ZSM_WWW_HOST.'admin.php/admin/sys/msgsend/'?>" class="title_button">发布公告</a>
</div>

<table width="100%" cellspacing="1" cellpadding="3" id="listTable">
  <tbody>
  <!-- 搜索开始 -->
  <tr>
	<td colspan="7">
	<form action="">
	用户ID:
	<input type="text" name="uid" id="uid" value="<?php echo Http::get('uid');?>"/>
	用户名:
	<input type="text" name="username" id="uid" value="<?php echo Http::get('username');?>"/>
	发送对象:
	<select name="stype" id="stype">
		<?php 
			if (Http::get('stype')=='0'){
				echo '<option value="'.Http::get('stype').'">所有</option>';
			}
			if (Http::get('stype')){
				echo '<option value="'.Http::get('stype').'">'.Http::get('stype').'</option>';
			}
		?>
		<?php 
			if (Http::get('stype')!='0'){?>
		<option value="0">所有</option>
		<?php }?>
		<option value="alluser">alluser</option>
		<option value="iphone">iphone</option>
		<option value="android">android</option>
		<option value="s60v5">s60v5</option>
		<option value="vip">vip</option>
	</select>
	日期:			
	<input 
		id="stimeline" 
		name="stimeline" 
		type="text" 
		style="width:65px;"
		value='<?php 
		if (Http::get('stimeline')){
			echo Http::get('stimeline');
		}
		?>' class='date demo_time'  
		onClick="WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM-dd'})"
		>-<input 
		id="etimeline" 
		name="etimeline" 
		type="text" 
		style="width:65px;"
		value='<?php 
		if (Http::get('etimeline')){
			echo Http::get('etimeline');
		}
		?>' class='date demo_time'  
		onClick="WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM-dd'})"
		>
	<input type="submit" value="搜 索" class="btn"> 
	
	</form>
	</td>
  </tr>
  <!-- 搜索结束 -->
  <tr>
  	<th align="left" width="50">
  		<a href="javascript:;" id="order_uid" onclick="orderBy('uid','DESC')">用户ID</a>
  	</th>  
    <th>
    	<a href="javascript:;" id="order_username" onclick="orderBy('username','DESC')">用户名</a>
    </th>   
    <th align="center">
    	<a href="javascript:;" id="order_stype" onclick="orderBy('stype','DESC')">发送类型</a>
    </th>    
    <th align="center">发送内容</th>
    <th align="center">发送结果</th>
    <th align="center">
    <a href="javascript:;" id="order_timeline" onclick="orderBy('timeline','DESC')">发送时间</a></th>
    <th align="center">操作</th>
  </tr>
 
	<?php 
	foreach ($rs['list'] as $k=>$v):
	?>
   <tr>
    <td align="left" width="50"> <?php echo $v['uid'];?></td>
    <td align="center">
	<?php echo $v['username'];?>
	</td>    
    <td align="center">
    <?php echo $v['stype'];?>
    </td> 
    <td align="center" width="280">
    <?php echo $v['content'];?>
    </td> 
    <td align="center" width="280">
    <?php echo $v['result'];?>
    </td> 
     <td align="center">
    <?php echo date("Y-m-d H:i:s",$v['timeline']);?>
    </td>  
    <td align="center">    	
    	<?php if ($user['username']=='admin' ){?>
    	<a title="移除" onclick="getUrl('<?php echo ZSM_WWW_HOST.'admin.php/admin/sys/msglist/do/del/id/'.$v['id'];?>',1,1)" href="javascript:;">移除</a>
    	<?php }?>
    </td>   
  </tr>
  <?php endforeach;?>
  <tr style="background: #F4FAFB;">
  	<td align="left" colspan="3">合计：记录数<?php echo $rs['total'];?>条，每页显示：<?php echo $rs['eachNums'];?>条 </td><td>&nbsp;</td>
	<td align="right" colspan="4"><?php echo $rs['html'];?></td>	
  </tr>
 
 
  </tbody>
</table>
<?php htmlTemplate('admin_footer_frame.php');?>
<script>
function  delItems()
{
	var items = getCheckItems();	
	if(!items){
		parent.showAlert('请选择要删除的用户！');
		return false;
	}
	var url = '<?php echo ZSM_WWW_HOST;?>admin.php/admin/product/typedel/id/'+items;
	getUrl(url,1,1);
}
</script>